<script lang="ts">
export default {
  name: "XBrand",
};
</script>
<script setup lang="ts">
import { ref } from "vue";
import { getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance() as any;
const data = ref("");
const addData = () => {
  console.log(proxy.$bus);
  proxy.$bus.emit("data", data.value);
};
// (Object as any).App.$emit("app", data.value);
</script>

<template>
  <h1>brand</h1>

  <el-form inline>
    <el-form-item label="数据">
      <el-input placeholder="请输入" v-model="data" style="width: 200px" />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="addData">添加数据</el-button>
    </el-form-item>
  </el-form>
</template>

<style lang="less" scoped></style>
